package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.EngineGroupInfo;
import com.task.core.domain.EngineInfo;
import com.task.core.dto.request.EngineRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/11/4 17:31
 */
@Mapper
public interface EngineMapper {

  List<EngineInfo> getEngineByPage(EngineRequestDTO request);

  EngineInfo getEngineByCode(String code);

  List<KeyAndValue> getEngineForOption(EngineRequestDTO request);

  void addEngine(EngineRequestDTO request);

  Integer modifyEngine(EngineRequestDTO request);

  Integer deleteEngine(@Param("code") String refererSourceCode, @Param("userId") Long userId);

  void addEngineGroupRelation(@Param("engineCode") String engineCode,
      @Param("engineGroupCodes") List<String> engineGroupCodes);

  List<String> getAllCodes();

  void deleteDeviceRelation(String engineCode);

  Integer getCountByVersionCodes(@Param("versionCodes") List<String> versionCodes);

    List<EngineInfo> getEngineInfoByCodes(@Param("codes")List<String> codes);

    void deleteEngineSchemeRelation(String engineCode);
}
